<template>
  <div class="page-home-films">
    <swiper class="swiper" :slides="bannerList"></swiper>
    <Tabs
    v-model="curTabIndex"
    :tabs="['正在热映','即将上映']"
    >
    </Tabs>
    <router-view></router-view>
  </div>
</template>

<script>
import Swiper from '../../components/Swiper'
import Tabs from '../../components/Tabs'
import { getBannerList } from '../../api/film'
export default {
  name: 'Flims',
  components: {
    [Swiper.name]: Swiper,
    [Tabs.name]: Tabs
  },
  data () {
    return {
      bannerList: []
    }
  },
  created () {
    getBannerList({
      type: 2,
      cityId: 440300,
      k: 8601288
    }).then(response => {
      let res = response.data
      // console.log(res)
      if (res.status === 0) {
        this.bannerList = res.data.map(item => item.imgUrl)
      }
    })
  }
}
</script>

<style lang="scss">
.page-home-films {
  .swiper {
    .swiper-pagination-bullet-active {
      background: #eee;
    }
  }
}
</style>
